<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:bs="http://none.cz">
<head th:include="common/layout::header"></head>
<body>
	<div th:substituteby="common/layout::menu"></div>
	
	<div class="container">
		<div th:include="common/layout::messages">
			cannot load messages
		</div>
		<form action="?" th:object="${form}" method="post" class="form form-standard">
			<h1 th:text="#{user-form.h1}">User registration</h1>
			<input type="hidden" id="referer" name="referer" th:field="*{referer}"/>
			<div class="control-group" th:attrappend="class=${#fields.hasErrors('email')}? ' error'">
				<label class="control-label" for="name" th:text="#{user-form.email}">email</label>
				<div class="controls">
					<input class="input-block-level" type="text" name="email" id="email" th:field="*{email}" />
				</div>
			</div>
			<div class="control-group" th:attrappend="class=${#fields.hasErrors('name')}? ' error'">
				<label class="control-label" for="name" th:text="#{user-form.name}">name</label>
				<div class="controls">
					<input class="input-block-level" type="text" name="name" id="name" th:field="*{name}" />
				</div>
			</div>
			<div class="control-group" th:attrappend="class=${#fields.hasErrors('surname')}? ' error'">
				<label class="control-label" for="name" th:text="#{user-form.surname}">surname</label>
				<div class="controls">
					<input class="input-block-level" type="text" name="surname" id="surname" th:field="*{surname}" />
				</div>
			</div>
			<div class="control-group" th:attrappend="class=${#fields.hasErrors('password1')}? ' error'">
				<label class="control-label" for="name" th:text="#{user-form.password1}">password1</label>
				<div class="controls">
					<input class="input-block-level" type="password" name="password1" id="password1" th:field="*{password1}" />
				</div>
			</div>
			<div class="control-group" th:attrappend="class=${#fields.hasErrors('password2')}? ' error'">
				<label class="control-label" for="name" th:text="#{user-form.password2}">password2</label>
				<div class="controls">
					<input class="input-block-level" type="password" name="password2" id="password2" th:field="*{password2}" />
				</div>
			</div>
			<button th:text="#{form.submit}" name="_submit" class="btn btn-large btn-primary" type="submit" value="submit">Register</button>
			<button th:text="#{form.cancel}" name="_submit" class="btn" type="submit" value="cancel">Cancel</button>
		</form>
	</div>

	<div th:include="common/layout::js"></div>
</body>
</html>